package com.ymk.cmd;

import com.ymk.base.cmd.ACmd;
import com.ymk.base.cmd.CmdSign;
import com.ymk.bo.stat.StatMchDayBO;
import com.ymk.core.code.cmd.StatMchCmdCode;
import com.ymk.service.IStatMchDayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;

@Service
public class StatMchDayDelCmd extends ACmd {

    @Override
    public CmdSign executeMop(HttpServletRequest request, CmdSign sign) throws Exception {
        CmdSign respSign = new CmdSign(sign);
        StatMchDayBO reqData = super.getData(sign, StatMchDayBO.class);

        StatMchDayBO delStatMchDayBO = new StatMchDayBO();
        delStatMchDayBO.setId(reqData.getId());
        this.StatMchDayService.del(delStatMchDayBO);

        return respSign;
    }

    @Override
    public String getCmdCode() {
        return StatMchCmdCode.STAT_MCH_DAY_DEL;
    }

    @Autowired
    private IStatMchDayService StatMchDayService;
}